package com.lelouch.dao;

import com.lelouch.bean.SysUser;
import com.lelouch.beans.PageQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    int countMail(@Param("mail") String mail, @Param("id") Integer id);

    int countTelephone(@Param("telephone") String telephone,@Param("id") Integer id);

    SysUser findByKeyword(@Param("keyword") String keyword);

    List<SysUser> pageByDeptId(@Param("deptId") Integer deptId, @Param("page") PageQuery pageQuery);

    int getUserCountByDeptId(@Param("deptId")Integer deptId);

    List<SysUser> getAll();

    List<SysUser> getUserListByIdList(@Param("userIdList") List<Integer> userIdList);
}